package com.javafactroy.kunlong.data.service;

import com.javafactroy.kunlong.base.dto.TQueryParam;
import com.javafactroy.kunlong.base.model.ReturnPageInfo;
import com.javafactroy.kunlong.data.dao.mysql.MetadataTablePropApiMapper;
import com.javafactroy.kunlong.data.entity.MetadataTablePropApiEntity;
import com.javafactroy.kunlong.data.dto.MetadataTablePropApiDto;

import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;

/**
*  @author raymond.lei@163.com
*  @date   2023-11-17 22:51:30

*/
@Slf4j
@Service
public class MetadataTablePropApiService extends ApiService<MetadataTablePropApiDto, MetadataTablePropApiEntity, MetadataTablePropApiMapper> {

  public MetadataTablePropApiService() {
        init();
   }

    void init() {
        iquerySome = (MetadataTablePropApiDto dto) -> {
        };

        iquerySomeList = (List<MetadataTablePropApiDto> list) -> {
            list.forEach(i -> iquerySome.querySome(i));
        };
    }

    public ReturnPageInfo<MetadataTablePropApiDto> queryParam(@Param("queryParam") TQueryParam<MetadataTablePropApiDto> queryParam) {
        if (queryParam.getParam() == null) {
            queryParam.setParam(new MetadataTablePropApiDto());
        }

        return super.queryParam(queryParam);

    }

}
